3.76 \(\int (e x)^{-1+n} (a+b \text {sech}(c+d x^n))^2 \, dx\)

Optimal. Leaf size=79 \[ \frac {a^2 (e x)^n}{e n}+\frac {2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac {b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n} \]

[Out]

a^2*(e*x)^n/e/n+2*a*b*(e*x)^n*arctan(sinh(c+d*x^n))/d/e/n/(x^n)+b^2*(e*x)^n*tanh(c+d*x^n)/d/e/n/(x^n)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {5440, 5436, 3773, 3770, 3767, 8} \[ \frac {a^2 (e x)^n}{e n}+\frac {2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac {b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + n)*(a + b*Sech[c + d*x^n])^2,x]

[Out]

(a^2*(e*x)^n)/(e*n) + (2*a*b*(e*x)^n*ArcTan[Sinh[c + d*x^n]])/(d*e*n*x^n) + (b^2*(e*x)^n*Tanh[c + d*x^n])/(d*e
*n*x^n)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3773

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[a^2*x, x] + (Dist[2*a*b, Int[Csc[c + d*x], x],
 x] + Dist[b^2, Int[Csc[c + d*x]^2, x], x]) /; FreeQ[{a, b, c, d}, x]

Rule 5436

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rule 5440

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*
x)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx &=\frac {\left (x^{-n} (e x)^n\right ) \int x^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx}{e}\\ &=\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int (a+b \text {sech}(c+d x))^2 \, dx,x,x^n\right )}{e n}\\ &=\frac {a^2 (e x)^n}{e n}+\frac {\left (2 a b x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \text {sech}(c+d x) \, dx,x,x^n\right )}{e n}+\frac {\left (b^2 x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \text {sech}^2(c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac {a^2 (e x)^n}{e n}+\frac {2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac {\left (i b^2 x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int 1 \, dx,x,-i \tanh \left (c+d x^n\right )\right )}{d e n}\\ &=\frac {a^2 (e x)^n}{e n}+\frac {2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac {b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 57, normalized size = 0.72 \[ \frac {x^{-n} (e x)^n \left (a \left (a \left (c+d x^n\right )+2 b \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )\right )+b^2 \tanh \left (c+d x^n\right )\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + n)*(a + b*Sech[c + d*x^n])^2,x]

[Out]

((e*x)^n*(a*(a*(c + d*x^n) + 2*b*ArcTan[Sinh[c + d*x^n]]) + b^2*Tanh[c + d*x^n]))/(d*e*n*x^n)

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 646, normalized size = 8.18 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*sech(c+d*x^n))^2,x, algorithm="fricas")

[Out]

(a^2*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + (a^2*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + a^2*d*cosh(n*log(x))
*sinh((n - 1)*log(e)) + (a^2*d*cosh((n - 1)*log(e)) + a^2*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(
n*log(x)) + d*sinh(n*log(x)) + c)^2 - 2*b^2*cosh((n - 1)*log(e)) + 2*(a^2*d*cosh((n - 1)*log(e))*cosh(n*log(x)
) + a^2*d*cosh(n*log(x))*sinh((n - 1)*log(e)) + (a^2*d*cosh((n - 1)*log(e)) + a^2*d*sinh((n - 1)*log(e)))*sinh
(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a^2
*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + a^2*d*cosh(n*log(x))*sinh((n - 1)*log(e)) + (a^2*d*cosh((n - 1)*log(e
)) + a^2*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + 4*((a*b*cos
h((n - 1)*log(e)) + a*b*sinh((n - 1)*log(e)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + a*b*cosh((n -
1)*log(e)) + 2*(a*b*cosh((n - 1)*log(e)) + a*b*sinh((n - 1)*log(e)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x))
+ c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a*b*cosh((n - 1)*log(e)) + a*b*sinh((n - 1)*log(e)))*sin
h(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + a*b*sinh((n - 1)*log(e)))*arctan(cosh(d*cosh(n*log(x)) + d*sinh
(n*log(x)) + c) + sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)) + (a^2*d*cosh(n*log(x)) - 2*b^2)*sinh((n - 1)
*log(e)) + (a^2*d*cosh((n - 1)*log(e)) + a^2*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))/(d*n*cosh(d*cosh(n*log(x)
) + d*sinh(n*log(x)) + c)^2 + 2*d*n*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*si
nh(n*log(x)) + c) + d*n*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + d*n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{n - 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*sech(c+d*x^n))^2,x, algorithm="giac")

[Out]

integrate((b*sech(d*x^n + c) + a)^2*(e*x)^(n - 1), x)

________________________________________________________________________________________

maple [C]  time = 0.66, size = 271, normalized size = 3.43 \[ \frac {a^{2} x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \relax (x )+2 \ln \relax (e )\right )}{2}}}{n}-\frac {2 x \,x^{-n} b^{2} {\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \relax (x )+2 \ln \relax (e )\right )}{2}}}{d n \left ({\mathrm e}^{2 c +2 d \,x^{n}}+1\right )}+\frac {4 \arctan \left ({\mathrm e}^{c +d \,x^{n}}\right ) e^{n} a b \,{\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d e n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+n)*(a+b*sech(c+d*x^n))^2,x)

[Out]

a^2/n*x*exp(1/2*(-1+n)*(-I*Pi*csgn(I*e)*csgn(I*x)*csgn(I*e*x)+I*Pi*csgn(I*e)*csgn(I*e*x)^2+I*Pi*csgn(I*x)*csgn
(I*e*x)^2-I*Pi*csgn(I*e*x)^3+2*ln(x)+2*ln(e)))-2/d/n*x/(x^n)*b^2*exp(1/2*(-1+n)*(-I*Pi*csgn(I*e)*csgn(I*x)*csg
n(I*e*x)+I*Pi*csgn(I*e)*csgn(I*e*x)^2+I*Pi*csgn(I*x)*csgn(I*e*x)^2-I*Pi*csgn(I*e*x)^3+2*ln(x)+2*ln(e)))/(exp(2
*c+2*d*x^n)+1)+4*arctan(exp(c+d*x^n))/d/e*e^n/n*a*b*exp(1/2*I*Pi*csgn(I*e*x)*(-1+n)*(csgn(I*e*x)-csgn(I*x))*(-
csgn(I*e*x)+csgn(I*e)))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ 4 \, a b e^{n} \int \frac {e^{\left (d x^{n} + n \log \relax (x) + c\right )}}{e x e^{\left (2 \, d x^{n} + 2 \, c\right )} + e x}\,{d x} - \frac {2 \, b^{2} e^{n}}{d e n e^{\left (2 \, d x^{n} + 2 \, c\right )} + d e n} + \frac {\left (e x\right )^{n} a^{2}}{e n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*sech(c+d*x^n))^2,x, algorithm="maxima")

[Out]

4*a*b*e^n*integrate(e^(d*x^n + n*log(x) + c)/(e*x*e^(2*d*x^n + 2*c) + e*x), x) - 2*b^2*e^n/(d*e*n*e^(2*d*x^n +
 2*c) + d*e*n) + (e*x)^n*a^2/(e*n)

________________________________________________________________________________________

mupad [B]  time = 1.42, size = 158, normalized size = 2.00 \[ \frac {4\,\mathrm {atan}\left (\frac {a\,b\,x\,{\mathrm {e}}^{d\,x^n}\,{\mathrm {e}}^c\,{\left (e\,x\right )}^{n-1}\,\sqrt {d^2\,n^2\,x^{2\,n}}}{d\,n\,x^n\,\sqrt {a^2\,b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}\right )\,\sqrt {a^2\,b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{\sqrt {d^2\,n^2\,x^{2\,n}}}+\frac {a^2\,x\,{\left (e\,x\right )}^{n-1}}{n}-\frac {2\,b^2\,x\,{\left (e\,x\right )}^{n-1}}{d\,n\,x^n\,\left ({\mathrm {e}}^{2\,c+2\,d\,x^n}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cosh(c + d*x^n))^2*(e*x)^(n - 1),x)

[Out]

(4*atan((a*b*x*exp(d*x^n)*exp(c)*(e*x)^(n - 1)*(d^2*n^2*x^(2*n))^(1/2))/(d*n*x^n*(a^2*b^2*x^2*(e*x)^(2*n - 2))
^(1/2)))*(a^2*b^2*x^2*(e*x)^(2*n - 2))^(1/2))/(d^2*n^2*x^(2*n))^(1/2) + (a^2*x*(e*x)^(n - 1))/n - (2*b^2*x*(e*
x)^(n - 1))/(d*n*x^n*(exp(2*c + 2*d*x^n) + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (e x\right )^{n - 1} \left (a + b \operatorname {sech}{\left (c + d x^{n} \right )}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+n)*(a+b*sech(c+d*x**n))**2,x)

[Out]

Integral((e*x)**(n - 1)*(a + b*sech(c + d*x**n))**2, x)

________________________________________________________________________________________